/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-09-01
*/
package com.rzico.basics.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.basics.entity.MemberPromotion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzico.basics.mapper.MemberPromotionMapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <pre>
 * 绑定用户业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class MemberPromotionService extends BaseServiceImpl<MemberPromotion, String> {

    @Autowired
    private MemberPromotionMapper memberPromotionMapper;

    @Override
    public BaseMapper<MemberPromotion, String> getMapper() {
        return memberPromotionMapper;
    }

    public Integer checkExists(Long promotionId,Long memberId) {
        Map<String,Object> params = new HashMap<>();
        params.put("promotionId",promotionId);
        params.put("memberId",memberId);
        return memberPromotionMapper.selectRowCount(params);
    }


}
